import apiClient from '@/api/apiClient';

// /management/agreements
const getAgreementList = (searchForm: any) =>
  apiClient.get({ url: '/agreement/list', params: searchForm });

// /management/agreement
const createAgreement = (data: any) =>
  apiClient.post({
    url: '/agreement',
    data,
  });

// /management/agreement/{id}
const updateAgreement = (id: number, data: any) =>
  apiClient.put({
    url: `/agreement/${id}`,
    data,
  });

// /management/agreement/{id}
const deleteAgreement = (id: number) =>
  apiClient.delete({
    url: `/agreement/${id}`,
  });

export default {
  getAgreementList,
  createAgreement,
  updateAgreement,
  deleteAgreement,
};
